export CLASSPATH=.:${PWD}/../antlr.jar

all: parser-and-lexer Main.class

.PHONY: parser-and-lexer
parser-and-lexer: gramatica.g
	java antlr.Tool $?

Main.class: Main.java
	javac $?

.PHONY: clean
clean:
	rm -f MeuLexico.java
	rm -f MeuLexico.smap
	rm -f MeuParser.java
	rm -f MeuParser.smap
	rm -f MeuParserTokenTypes.java
	rm -f MeuParserTokenTypes.txt
	rm -f *.class
